<?php
    $msq = new mysqli('localhost', 'root', 'root', 'yiguoshengxian');
    // 检测连接
    if ($msq->connect_error) {
        die("连接失败: " . $msq->connect_error);
    } 
?>